import { NestFactory } from '@nestjs/core';
import { ValidationPipe } from '@nestjs/common';
import { AppModule } from './app.module';

const colors = require('colors');
const PORT = 8000;

async function bootstrap() {
  const app = await NestFactory.create(AppModule);
  app.useGlobalPipes(new ValidationPipe());
  await app.listen(PORT);
  console.log(
    colors.rainbow(`Server strting on port: ${PORT}`),
    colors.magenta(`            Happy Hacking`),
  );
}
bootstrap();
